{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('form');}
{echo:JS::import('date');}
<form action="" method="post">
<div class="tools_bar clearfix">
    <a class="icon-checkbox-checked icon-checkbox-unchecked" href="javascript:;" onclick="tools_select('id[]',this)" title="全选" data="true"> 全选 </a>
    <a  class="icon-remove-2" href="javascript:;"  onclick="tools_submit({action:'{url:/customer/ly_del}',msg:'删除后无法恢复，你真的删除吗？'})" title="删除"> 删除</a>
    <a class="icon-delicious" href="{url:/customer/ly_list}"> 全部留言</a>

    <span class="fr"><a href='javascript:;' id="condition" class="icon-search" style="" > 筛选条件</a><input id="condition_input" type="hidden" name="condition" value="{$condition}"></span>
</div>
<table class="default" >
    <tr>
        <th style="width:30px">选择</th>
        <th style="width:70px">操作</th>
        <th style="width:90px">留言人</th>
        <th >留言内容</th>
        <th style="width:140px">留言时间</th>
        <th style="width:60px">是否回复</th>
        <th style="width:140px">回复时间</th>

    </tr>
    {query:name=ly as wd fields=wd.*,us.name as uname join=inner join user as us on wd.user_id eq us.id where= $where id=$obj page=1 desc }
        <tr><td style="width:30px"><input type="checkbox" name="id[]" value="{$item['id']}"></td>
        <td style="width:70px" class="btn_min">
        <div class="operat hidden"><a  class="icon-cog action" href="javascript:;"> 处理</a>
            <div class="menu_select">
                <ul>
                    <li><a class="icon-pencil" href="{url:/customer/ly_edit/id/$item[id]}"> 回复</a></li>
                    <li><a class="icon-remove-2" href="javascript:confirm_action('{url:/customer/ly_del/id/$item[id]}')"> 删除</a></li>
                </ul>
            </div>
        </div>
        </td>
        <td>{$item['uname']}</td>
        <td >{$item['question']|''|str}</td>
        <td style="width:140px">{$item['ask_time']}</td>
        <td style="width:60px">{if:$item['status']==1}<b class="green">已回复</b>{else:}<span class="red">未回复</span>{/if}
        <td style="width:140px">{$item['reply_time']}</td>
        </tr>
    {/query}
</table>
</form>
<div class="page_nav">
{echo:$obj->pageBar()}
</div>
<script type="text/javascript">
    $("#condition").on("click",function(){
    $("body").Condition({input:"#condition_input",okVal:'高级搜索',callback:function(data){tools_submit({action:'{url:/customer/ly_list}',method:'get'});},data:{'us.name':{name:'留言人'},question:{name:'留言内容'},'status':{name:'是否回复',values:{0:'未回复',1:'已回复'}},ask_time:{name:'留言时间'}
    }});
    });
</script>
